<template>
    <div>
        <input type="text" v-model="keyword">
        <br>
        {{keyword}}
    </div>
</template>
<script>
import {
  onMounted,
    //  reactive,
     ref,
     watch
  } from 'vue'
// 2.warch
export default{
  props:['msg'],
  setup(props){
      console.log(props)
      console.log("setup")
   let keyword = ref("")
  watch(keyword,(newData,oldData)=>{
      console.log(newData,oldData)
  })
  onMounted(()=>{
      console.log('onMounted')
  })
   return {
       keyword
   }
  },
  beforeCreate(){
      console.log('beforeCreate')
  }
}

</script>
